package com.example.demo.vo

import com.example.demo.dbmodels.TQuestionnaireAnswer
import io.swagger.annotations.ApiModelProperty

class AnswerVo {


    @ApiModelProperty("id")
    var id: Int? = null

    @ApiModelProperty("标题")
    var title: String? = null

    @ApiModelProperty("问卷标题id")
    var quest_id: Int? = null


    fun getListVo(table: List<TQuestionnaireAnswer>): List<AnswerVo> {
        table.let {
            val list = mutableListOf<AnswerVo>()
            it.forEach {
                val data = AnswerVo()
                data.id = it.id
                data.title = it.title
                data.quest_id = it.quest_id
                list.add(data)
            }
            return list
        }
    }


}